package com.gitee.minimalismstyle.fresh.flowable.api.feign.fallback

import com.gitee.minimalismstyle.fresh.common.core.domain.R
import com.gitee.minimalismstyle.fresh.flowable.api.feign.DeploymentApi
import com.gitee.minimalismstyle.fresh.flowable.api.feign.model.DataResponse
import com.gitee.minimalismstyle.fresh.flowable.api.feign.model.DeploymentResourceResponse
import com.gitee.minimalismstyle.fresh.flowable.api.feign.model.DeploymentResponse
import org.springframework.web.multipart.MultipartFile

class DeploymentApiFallback : DeploymentApi {
    override fun listDeployments(name: String?, nameLike: String?, category: String?, categoryNotEquals: String?, parentDeploymentId: String?, parentDeploymentIdLike: String?, tenantId: String?, tenantIdLike: String?, withoutTenantId: Boolean?, sort: String?): R<DataResponse<DeploymentResponse>> {
        return R.error("服务无法访问")
    }

    override fun uploadDeployment(deploymentKey: String?, deploymentName: String?, tenantId: String?, file: MultipartFile): R<DeploymentResponse> {
        return R.error("服务无法访问")
    }

    override fun getDeployment(deploymentId: String): R<DeploymentResponse> {
        return R.error("服务无法访问")
    }

    override fun deleteDeployment(deploymentId: String, cascade: Boolean?): R<Any> {
        return R.error("服务无法访问")
    }

    override fun getDeploymentResourceData(deploymentId: String, resourceName: String): R<Any> {
        return R.error("服务无法访问")
    }

    override fun listDeploymentResources(deploymentId: String): R<Any> {
        return R.error("服务无法访问")
    }

    override fun getDeploymentResource(deploymentId: String): R<DeploymentResourceResponse> {
        return R.error("服务无法访问")
    }
}